One way of doing version control…
git, which is a strangely named version control softwaregit is very widely used
git would be Microsoft Wordgit do?git allows you to bundle up changes to various files, and give the group of changes a unique commit hash and an explanatory message.git works on a project level, so you can make a bunch of changes to different files in a folder, and then commit all those changes with a descriptive messageOld version of python-file.py
1 # This is a comment
2 import matplotlib.pyplot as plt
3 x = [1, 2, 3, 4, 5]
4 y = [3, 4, 5, 6, 7]
5 plt.scatter(x, y)
New version of python-file.py
1 # This is a comment
2 import matplotlib.pyplot as plt
3 import numpy as np
4 x = [1, 2, 3, 4, 5]
5 y = [3, 4, 5, 6, 7]
6 plt.scatter(x, y)
6 plt.plot(x, y)
Line 3 added, line 6 removed, line 6 added.
New version of python-file.py
1 # This is a comment
2 import matplotlib.pyplot as plt
3 import numpy as np
4 x = [1, 2, 3, 4, 5]
5 y = [3, 4, 5, 6, 7]
6 plt.scatter(x, y)
6 plt.plot(x, y)
Line 3 added, line 6 removed, line 6 added.
Associated git commit
File: python-file.py
Commit hash: u87wy9o2
Commit message: change plotting method
+++ 3 import numpy as np
— 6 plt.scatter(x, y)
+++ 6 plt.plot(x, y)
Maeve Murphy Quinlan | Version control | murphyqm.github.io